package work20241210.a_String;

/**
 * @author zdl
 * @date 2024/12/10
 */
public class SrringIsEmpty {
    public static void main(String[] args) {
        String str = "";
        System.out.println(str.isEmpty()); //判断字符串是否为空
        char[] charArray = str.toCharArray();
        if (charArray.length == 0){
            System.out.println("字符串为空");
        }else {
            System.out.println("字符串不为空");
        }
    }
}
